<template>
  <view class="page">
    <!-- 页头导航 -->
    <view class="header-nav">
      <view class="nav-left" @tap="goBack">
        <image src="/static/icons/left_arrow.png" class="back-icon"></image>
      </view>
      <text class="nav-title">HR入驻申请</text>
      <view class="nav-right"></view>
    </view>
    
    <view class="container">
      <!-- 标题区域 -->
      <view class="header">
        <text class="title">成为企业HR</text>
        <text class="subtitle">选择您要入驻的企业，开始招聘之旅</text>
      </view>

      <!-- 选择方式区域 -->
      <view class="selection-section">
        <!-- 方式1：选择现有公司 -->
        <view class="selection-card" @tap="selectExistingCompany">
          <view class="card-icon">
            <image src="/static/icons/company/company.png" class="icon"></image>
          </view>
          <view class="card-content">
            <text class="card-title">选择现有公司</text>
            <text class="card-desc">您的公司已入驻平台，直接申请成为HR</text>
          </view>
          <image src="/static/icons/right-arrow.png" class="arrow-icon"></image>
        </view>

        <!-- 方式2：创建新公司 -->
        <view class="selection-card" @tap="createNewCompany">
          <view class="card-icon">
            <image src="/static/icons/icon-add.png" class="icon"></image>
          </view>
          <view class="card-content">
            <text class="card-title">创建新公司</text>
            <text class="card-desc">您的公司尚未入驻，创建公司并申请成为HR</text>
          </view>
          <image src="/static/icons/right-arrow.png" class="arrow-icon"></image>
        </view>
      </view>

      <!-- 申请流程说明 -->
      <view class="process-section">
        <text class="process-title">申请流程</text>
        <view class="process-steps">
          <view class="step-item">
            <view class="step-number">1</view>
            <view class="step-content">
              <text class="step-title">选择或创建公司</text>
              <text class="step-desc">选择现有公司或创建新公司</text>
            </view>
          </view>
          <view class="step-item">
            <view class="step-number">2</view>
            <view class="step-content">
              <text class="step-title">填写个人信息</text>
              <text class="step-desc">填写姓名、职务等基本信息</text>
            </view>
          </view>
          <view class="step-item">
            <view class="step-number">3</view>
            <view class="step-content">
              <text class="step-title">上传授权书</text>
              <text class="step-desc">上传企业授权书进行审核</text>
            </view>
          </view>
          <view class="step-item">
            <view class="step-number">4</view>
            <view class="step-content">
              <text class="step-title">等待审核</text>
              <text class="step-desc">审核结果将在我的消息-系统通知中展示</text>
            </view>
          </view>
        </view>
      </view>

      <!-- 注意事项 -->
      <view class="notice-section">
        <text class="notice-title">注意事项</text>
        <view class="notice-list">
          <text class="notice-item">• 请确保公司信息真实有效</text>
          <text class="notice-item">• 授权书需要企业盖章确认</text>
          <text class="notice-item">• 审核通过后即可开始招聘</text>
        </view>
      </view>
    </view>
  </view>
</template>

<script setup>
import { ref } from 'vue'

// 选择现有公司
const selectExistingCompany = () => {
  uni.navigateTo({
    url: '/pages/candidate/selectCompany'
  })
}

// 创建新公司
const createNewCompany = () => {
  uni.navigateTo({
    url: '/pages/candidate/createCompany'
  })
}

// 返回上一页
const goBack = () => {
  uni.navigateBack()
}
</script>

<style scoped>
.page {
  min-height: 100vh;
  background-color: #f8f8f8;
}

.header-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88rpx;
  background-color: #ffffff;
  padding: 0 30rpx;
  border-bottom: 1rpx solid #f0f0f0;
}

.nav-left {
  display: flex;
  align-items: center;
  width: 60rpx;
}

.back-icon {
  width: 32rpx;
  height: 32rpx;
}

.nav-title {
  font-size: 34rpx;
  font-weight: 500;
  color: #333333;
}

.nav-right {
  width: 60rpx;
}

.container {
  padding: 40rpx;
}

.header {
  text-align: center;
  margin-bottom: 60rpx;
}

.title {
  display: block;
  font-size: 48rpx;
  font-weight: bold;
  color: #333333;
  margin-bottom: 16rpx;
}

.subtitle {
  display: block;
  font-size: 28rpx;
  color: #999999;
}

/* 选择方式区域 */
.selection-section {
  margin-bottom: 60rpx;
}

.selection-card {
  display: flex;
  align-items: center;
  background-color: #ffffff;
  border-radius: 16rpx;
  padding: 40rpx 30rpx;
  margin-bottom: 30rpx;
  box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.selection-card:active {
  transform: scale(0.98);
  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.12);
}

.card-icon {
  width: 80rpx;
  height: 80rpx;
  background-color: #f0f9ff;
  border-radius: 20rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 30rpx;
}

.icon {
  width: 40rpx;
  height: 40rpx;
}

.card-content {
  flex: 1;
}

.card-title {
  display: block;
  font-size: 32rpx;
  font-weight: 600;
  color: #333333;
  margin-bottom: 8rpx;
}

.card-desc {
  display: block;
  font-size: 26rpx;
  color: #666666;
  line-height: 1.4;
}

.arrow-icon {
  width: 32rpx;
  height: 32rpx;
  opacity: 0.6;
}

/* 申请流程说明 */
.process-section {
  background-color: #ffffff;
  border-radius: 16rpx;
  padding: 40rpx 30rpx;
  margin-bottom: 40rpx;
  box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.08);
}

.process-title {
  display: block;
  font-size: 32rpx;
  font-weight: 600;
  color: #333333;
  margin-bottom: 30rpx;
  text-align: center;
}

.process-steps {
  display: flex;
  flex-direction: column;
  gap: 30rpx;
}

.step-item {
  display: flex;
  align-items: flex-start;
}

.step-number {
  width: 60rpx;
  height: 60rpx;
  background-color: #00bdb4;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28rpx;
  font-weight: 600;
  margin-right: 30rpx;
  flex-shrink: 0;
}

.step-content {
  flex: 1;
  padding-top: 8rpx;
}

.step-title {
  display: block;
  font-size: 28rpx;
  font-weight: 500;
  color: #333333;
  margin-bottom: 8rpx;
}

.step-desc {
  display: block;
  font-size: 24rpx;
  color: #666666;
  line-height: 1.4;
}

/* 注意事项 */
.notice-section {
  background-color: #fffbe6;
  border: 1rpx solid #ffe58f;
  border-radius: 16rpx;
  padding: 30rpx;
}

.notice-title {
  display: block;
  font-size: 28rpx;
  font-weight: 600;
  color: #faad14;
  margin-bottom: 20rpx;
}

.notice-list {
  display: flex;
  flex-direction: column;
  gap: 12rpx;
}

.notice-item {
  font-size: 24rpx;
  color: #faad14;
  line-height: 1.4;
}
</style>